package trinnes.oliver.unimaas.smartpentalath.intelligence.features;

import trinnes.oliver.unimaas.smartpentalath.control.Game;
import trinnes.oliver.unimaas.smartpentalath.data.Move;

/**
 *
 * @author Oliver Trinnes
 */
public class CenterFeature extends Feature
{

  public CenterFeature(int weight)
  {
    super(weight);
  }

  @Override
  public int getValue(Game game, int move)
  {
    if(move == Move.SWAP)
      return 0;
    int val = game.getBoard().getSize()-game.getBoard().getCells().get(move).getCenterDist();
    return val;
  }
  
}
